package models;

import javax.persistence.*;

import play.data.validation.Constraints.Required;
import play.db.ebean.Model;


@Entity
public class Caracteristique extends Model {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="ID")
	int licenseNumber;

	String name;

	@ManyToOne
	@Required
	@JoinColumn(name="PRODUIT_ID")
	Produit prod;
	
	public void setIdProdPet(Long id){
		this.prod.id=id;
	}
	
	public static void create(Caracteristique p) {
		p.save();
	}
}
